<?php
class Block_Tabs extends Zend_Controller_Action_Helper_Abstract
{
    private $_view;
    
    public function __construct($view) {
        $this->_view = $view;
    }

    public function init() {
        $this->createTabsBlock();
    }

    public function createTabsBlock() {
        $modelTags = new Application_Model_Tags();
        $tags  = $modelTags->getPopularTags();
        $layout = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('Layout');
        $layout->tabs = $this->_view->partial(
            'tabs.phtml',
            array(
                'tags' => $tags
            )
        );
    }

}